<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport"
        content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>菩提阁</title>
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="css/base.css" />
    <link rel="stylesheet" href="css/pages/index.css" />
    <link rel="stylesheet" href="css/pages/vant.min.css">
</head>

<body>
    <div id="main" class="app">
        <div class="divHead"><a href="./user.html"><img src="./images/user.png" /></a></div>
        <div class="divTitle">
            <div class="divStatic">
                <img src="./images/logo.png" class="logo" />
                <div class="divDesc">
                    <div class="divName">菩提阁餐厅</div>
                    <div class="divSend">
                        <span><img src="./images/time.png" /> 距离1.5km</span>
                        <span><img src="./images/money.png" />
                            配送费6元</span>
                        <span><img src="./images/location.png" />
                            预计时长12min</span>
                    </div>
                </div>
            </div>
            <div class="divDesc">
                简介: 菩提阁中餐厅是菩提阁点餐的独立的品牌，定位“大众
                化的美食外送餐饮”，旨为顾客打造专业美食。
            </div>
        </div>
        <div class="divBody">
            <div class="divType">
                <ul>
                    <!-- 菜品分类 -->
                </ul>
            </div>

            <div class="divMenu">
                <div>
                    <!-- 菜品详细 -->
                </div>
            </div>
        </div>
        <!-- 去结算 -->
        <div class="divCart">
            <div class="imgCartActive"></div>
            <div class="divGoodsNum">0</div>
            <div class="divNum"><span>￥</span> <span>0</span></div>
            <div class="divPrice"></div>
            <div class="btnSubmitActive">去结算</div>
        </div>

        <!-- 购物车展开 -->
        <div class="van-overlay" style="z-index: 2011; display: none;"></div>
        <div class="dialogCart van-popup van-popup--bottom" style="height: 50%; z-index: 2012;display: none;">
            <div class="divCartTitle">
                <div class="title">购物车</div>
                <div class="clear"><i class="el-icon-delete"></i> 清空
                </div>
            </div>
            <div class="divCartContent">

                <!--  购物车list-->

            </div>

        </div>


    </div>

</body>
<!--渲染菜品菜单  -->

<script type="text/html" id="tpl-divType">
    <ul>
        {{each data}}
        <li data-id="{{$value.id}}" data-type="{{$value.type}}">{{$value.name}}</li>
        {{/each}}
    </ul>
</script>
<!-- 渲染菜品 -->
<script type="text/html" id="tpl-divItem">
    {{each data}}
    <div class="divItem" >
        <div class="el-image">
            <img src="http://121.4.102.44:8083/common/download?name={{$value.image}}"
                class="el-image__inner" />
            <!---->
        </div>
        <div>
            <div class="divName">{{$value.name}}</div>
            <div class="divDesc">
                {{$value.description}}
            </div>
            <div class="divDesc">月销0</div>
            <div class="divBottom">
                <span>￥</span><span>{{$value.price/100}}</span>
            </div>
            <div class="divNum">
            {{if $value.flavors.length===0}}
                <div class="divSubtract" >
                    <img src="./images/subtract.png" id="Sub">
                </div>
            <div class="divDishNum" data-id="{{$value.id}}" data-price="{{$value.price/100}}" data-img="{{$value.image}}" data-name="{{$value.name}}">0</div>
                <div class="divAdd">
                    <img src="./images/add.png" id="Add"/>
                </div>   
                {{else}}
                <div class="divTypes" id="type">选择规格</div>
            {{/if}}
            </div>
        </div>
    </div>
   
  

    {{/each}}    
</script>

<!-- 菜品展开详细 -->
<script type="text/html" id="tpl-divContainer">
    <div role="dialog" class="detailsDialog van-dialog" style="z-index: 2051; display: none;">
        <div class="van-dialog__content">
            <div class="divContainer">
                <div class="el-image"><img src="http://121.4.102.44:8083/common/download?name={{image}}"
                        class="el-image__inner">
                </div>
                <div class="title">{{name}}</div>
                <div class="content">{{description}}</div>
            </div>
            <div class="divNum">
                <div class="left"><span>￥</span><span>{{price/100}}</span></div>
                <div class="right">
        
                    <div class="divSubtract1"><img src="./images/subtract.png"></div>
                    <div class="divDishNum" data-id="{{id}}" data-price="{{price/100}}" data-img="{{image}}" data-name="{{name}}">1</div>
                    <div class="divAdd1"><img src="./images/add.png"></div>
                  
                    
                </div>
            </div>
            <div class="detailsDialogClose"><img src="./images/close.png"></div>
        </div>
        <div class="van-hairline--top van-dialog__footer"></div>
    </div>

</script>

<!-- 详细选择分类 -->
<script type="text/html" id="tpl-dialogFlavor">



    <div role="dialog" class="dialogFlavor van-dialog" style="z-index: 2004;">
        <div class=" van-dialog__content">
            <div class="dialogTitle">菜品</div>
            <div class="divContent" >
                
                {{each flavors}}
                <div>
                    <div class="divFlavorTitle">{{$value.name}}</div> 
                    {{each $value.value}}
                    <span class="">{{$value}}</span>
                    {{/each}}
                </div>
                {{/each}}
            </div>
            <div class="divBottom">
                <div><span class="spanMoney">￥</span>{{price/100}}</div>
                <div class="addCar" data-length="{{flavors.length}}" data-id="{{id}}" data-name="{{name}}" data-name="{{name}}" data-img="{{image}}" data-price="{{price/100}}">加入购物车</div>
            </div>
            <div class="divFlavorClose"><img src="./images/close.png"></div>
        </div>
        <div class="van-hairline--top van-dialog__footer"></div>
    </div>

</script>


<!-- 渲染购物车 -->
<script type="text/html" id="tpl-divCartItem">
    {{each data}}
    <div class="divCartItem"  >
        <div class="el-image"><img src="http://121.4.102.44:8083/common/download?name={{$value.image}}"
                class="el-image__inner">
            <!---->
        </div>
        <div class="divDesc">
            <div class="name">{{$value.name}}</div>
            <div class="price"><span class="spanMoney">￥</span>{{$value.amount}}</div>
        </div>
        <div class="divNum">
            <div class="divSubtract"><img src="./images/subtract.png" ></div>
            <div class="divDishNum" data-id="{{$value.dishId||$value.setmealId}}">{{$value.number}}</div>
            <div class="divAdd" data-dishId="{{$value.dishId}}" data-setmealId="{{$value.setmealId}}"><img src="./images/add.png" ></div>
        </div>
        <div class="divSplit"></div>
    </div>  
    {{/each}}

</script>

<!-- 购物车 -->
<script src="./lib/jquery.js"></script>
<script src="./lib/template-web.js"></script>
<script src="./js/baseAPI.js"></script>
<script src="./js/index.js"></script>

</html>